"""
@author: xxw
@file: response.py
@time: 2023/8/1 19:44
"""
# 响应数据函数
def generate_response(data = None, message = "success!", code = 0):
    # 约定返回的数据格式
    if data is None:
        data = []
    return {
        "code": code,
        "data": data,
        "message": message
    }